.class Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ResizeEvent;
.super Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/AbstractParseParamsEvent;
.source "ResizeEvent.java"


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/AbstractParseParamsEvent",
        "<",
        "Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ResizeProperties;",
        ">;"
    }
.end annotation


# static fields
.field static final EVENT_ID:I = 0xa

.field private static final LOG:Lcom/burstly/lib/util/LoggerExt; = null

.field private static final METHOD_NAME:Ljava/lang/String; = "resize"

.field private static final STATE:Ljava/lang/String; = "state"

.field private static final TAG:Ljava/lang/String;


# instance fields
.field private mView:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 36
    invoke-static {}, Lcom/burstly/lib/util/LoggerExt;->getInstance()Lcom/burstly/lib/util/LoggerExt;

    move-result-object v0

    sput-object v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ResizeEvent;->LOG:Lcom/burstly/lib/util/LoggerExt;

    .line 41
    const-class v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ResizeEvent;

    invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;

    move-result-object v0

    sput-object v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ResizeEvent;->TAG:Ljava/lang/String;

    return-void
.end method

.method protected constructor <init>()V
    .locals 1

    .prologue
    .line 62
    const-class v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ResizeProperties;

    invoke-direct {p0, v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/AbstractParseParamsEvent;-><init>(Ljava/lang/Class;)V

    .line 63
    return-void
.end method


# virtual methods
.method protected cleanUp()V
    .locals 1

    .prologue
    .line 99
    invoke-super {p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/AbstractParseParamsEvent;->cleanUp()V

    .line 100
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ResizeEvent;->mView:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;

    .line 101
    return-void
.end method

.method public parsed(Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ResizeProperties;)V
    .locals 8
    .parameter "properties"

    .prologue
    .line 67
    if-eqz p1, :cond_5

    .line 68
    iget-object v3, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ResizeEvent;->mView:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;

    iget-object v3, v3, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->mViewState:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidViewState;

    invoke-virtual {v3}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidViewState;->getState()Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;

    move-result-object v2

    .line 69
    .local v2, state:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;
    sget-object v3, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;->RESIZED:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;

    if-ne v2, v3, :cond_2

    .line 70
    iget-object v3, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ResizeEvent;->mView:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;

    invoke-virtual {v3}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->getOpenedOverlay()Lcom/burstly/lib/component/networkcomponent/burstly/OverlayContainer;

    move-result-object v1

    .line 71
    .local v1, openedOverlay:Lcom/burstly/lib/component/networkcomponent/burstly/OverlayContainer;,"Lcom/burstly/lib/component/networkcomponent/burstly/OverlayContainer<*>;"
    if-eqz v1, :cond_0

    instance-of v3, v1, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidResizedView;

    if-eqz v3, :cond_0

    .line 72
    check-cast v1, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidResizedView;

    .end local v1           #openedOverlay:Lcom/burstly/lib/component/networkcomponent/burstly/OverlayContainer;,"Lcom/burstly/lib/component/networkcomponent/burstly/OverlayContainer<*>;"
    invoke-virtual {v1, p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidResizedView;->reConfigureCreatedContainer(Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ResizeProperties;)V

    .line 74
    :cond_0
    iget-object v3, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ResizeEvent;->mView:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;

    const-string v4, "state"

    sget-object v5, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;->RESIZED:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;

    invoke-virtual {v5}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;->name()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v3, v4, v5}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->fireSimpleChangeEvent(Ljava/lang/String;Ljava/lang/Object;)V

    .line 76
    iget-object v3, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ResizeEvent;->mView:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;

    const/4 v4, 0x7

    const/4 v5, 0x1

    new-array v5, v5, [Ljava/lang/Object;

    const/4 v6, 0x0

    sget-object v7, Ljava/lang/Boolean;->TRUE:Ljava/lang/Boolean;

    aput-object v7, v5, v6

    invoke-virtual {v3, v4, v5}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->sendEvent(I[Ljava/lang/Object;)V

    .line 95
    .end local v2           #state:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;
    :cond_1
    :goto_0
    return-void

    .line 79
    .restart local v2       #state:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;
    :cond_2
    sget-object v3, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;->DEFAULT:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;

    if-ne v2, v3, :cond_4

    .line 80
    new-instance v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidResizedView;

    iget-object v3, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ResizeEvent;->mView:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;

    invoke-direct {v0, v3}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidResizedView;-><init>(Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;)V

    .line 81
    .local v0, expandedView:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidResizedView;,"Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidResizedView<*>;"
    invoke-virtual {v0, p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidResizedView;->setResizeProperties(Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ResizeProperties;)V

    .line 82
    invoke-virtual {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidResizedView;->showOverlayed()V

    .line 83
    iget-object v3, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ResizeEvent;->mView:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;

    invoke-virtual {v3, v0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->setOpenedOverlay(Lcom/burstly/lib/component/networkcomponent/burstly/OverlayContainer;)V

    .line 84
    iget-object v3, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ResizeEvent;->mView:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;

    const-string v4, "state"

    sget-object v5, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;->RESIZED:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;

    invoke-virtual {v5}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;->name()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v3, v4, v5}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->fireSimpleChangeEvent(Ljava/lang/String;Ljava/lang/Object;)V

    .line 85
    iget-object v3, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ResizeEvent;->mView:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;

    iget-object v3, v3, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->mRichMediaListener:Lcom/burstly/lib/component/networkcomponent/burstly/html/IRichMediaAdListener;

    if-eqz v3, :cond_3

    .line 86
    iget-object v3, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ResizeEvent;->mView:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;

    iget-object v3, v3, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->mRichMediaListener:Lcom/burstly/lib/component/networkcomponent/burstly/html/IRichMediaAdListener;

    invoke-interface {v3}, Lcom/burstly/lib/component/networkcomponent/burstly/html/IRichMediaAdListener;->onResize()Z

    .line 88
    :cond_3
    iget-object v3, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ResizeEvent;->mView:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;

    iget-object v3, v3, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->mViewState:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidViewState;

    sget-object v4, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;->RESIZED:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;

    invoke-virtual {v3, v4}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidViewState;->setState(Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;)V

    goto :goto_0

    .line 89
    .end local v0           #expandedView:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidResizedView;,"Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidResizedView<*>;"
    :cond_4
    sget-object v3, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;->EXPANDED:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;

    if-ne v2, v3, :cond_1

    .line 90
    iget-object v3, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ResizeEvent;->mView:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;

    const-string v4, "resize"

    const-string v5, "The view is in the expanded state. Resize is forbidden."

    invoke-virtual {v3, v4, v5}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->fireErrorEvent(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0

    .line 93
    .end local v2           #state:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;
    :cond_5
    iget-object v3, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ResizeEvent;->mView:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;

    const-string v4, "resize"

    const-string v5, "Resize properties is not valid JSON string"

    invoke-virtual {v3, v4, v5}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->fireErrorEvent(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0
.end method

.method public bridge synthetic parsed(Ljava/lang/Object;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 26
    check-cast p1, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ResizeProperties;

    .end local p1
    invoke-virtual {p0, p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ResizeEvent;->parsed(Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ResizeProperties;)V

    return-void
.end method

.method protected setUpEvent(Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;[Ljava/lang/Object;)Z
    .locals 6
    .parameter "mraidView"
    .parameter "args"

    .prologue
    const/4 v1, 0x0

    .line 105
    iput-object p1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ResizeEvent;->mView:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;

    .line 106
    iget-object v2, p1, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->mViewState:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidViewState;

    invoke-virtual {v2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidViewState;->getState()Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;

    move-result-object v0

    .line 107
    .local v0, state:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;
    sget-object v2, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;->EXPANDED:Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidBridgeState;

    if-ne v0, v2, :cond_0

    .line 108
    const-string v2, "resize"

    const-string v3, "The view is in the expanded state. Resize is forbidden."

    invoke-virtual {p1, v2, v3}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->fireErrorEvent(Ljava/lang/String;Ljava/lang/String;)V

    .line 115
    :goto_0
    return v1

    .line 111
    :cond_0
    invoke-virtual {p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/MraidView;->isInterstitial()Z

    move-result v2

    if-eqz v2, :cond_1

    .line 112
    sget-object v2, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ResizeEvent;->LOG:Lcom/burstly/lib/util/LoggerExt;

    sget-object v3, Lcom/burstly/lib/component/networkcomponent/burstly/html/mraid/ResizeEvent;->TAG:Ljava/lang/String;

    const-string v4, "The view is in interstitial mode. Skipped resize call."

    new-array v5, v1, [Ljava/lang/Object;

    invoke-virtual {v2, v3, v4, v5}, Lcom/burstly/lib/util/LoggerExt;->logDebug(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    goto :goto_0

    .line 115
    :cond_1
    const/4 v1, 0x1

    goto :goto_0
.end method
